﻿Module Module1
  Sub Main()

    Dim dbl As Double = 37730.666666666
    ' conversione da Double a Date
    Dim dt As DateTime
    dt = Date.FromOADate(dbl)
    ' visualizza 19/04/2003 16.00.00:
    Console.WriteLine(dt.ToString)

    Dim dt2 As New Date(2003, 4, 19)
    dbl = dt2.ToOADate()
    ' visualizza 37730
    Console.WriteLine(dbl)

    Dim dt3 As New DateTime(2003, 4, 19, 16, 0, 0)
    dbl = dt3.ToOADate()
    ' visualizza 37730.6666666667
    Console.WriteLine(dbl)
    Console.ReadLine()

  End Sub
End Module
